refactor(BaseFormat): merge ChangelogFormat into BaseFormat#1612
refactor(BaseFormat): merge ChangelogFormat into BaseFormat#1612bearomorphism wants to merge 3 commits intocommitizen-tools:masterfrom
Conversation
|
|
||
| def parse_version_from_title(self, line: str) -> VersionTag | None: | ||
| raise NotImplementedError("parse_version_from_title is not implemented") | ||
|
|
||
| def parse_title_level(self, line: str) -> int | None: | ||
| raise NotImplementedError("parse_title_level is not implemented") |
There was a problem hiding this comment.
Not sure if we're going to implement these.
There was a problem hiding this comment.
I think not. Those methods look like protected and is only used in get_metadata_from_file but this class overrides the function get_metadata_from_file
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1612 +/- ##
==========================================
+ Coverage 97.33% 98.29% +0.95%
==========================================
Files 42 58 +16
Lines 2104 2695 +591
==========================================
+ Hits 2048 2649 +601
+ Misses 56 46 -10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
I think @noirbizarre might be a better person to take a look at this one. My guts feeling tells me |
Description
BaseFormatalready looks like a base class for changelog format, but it has a parent class protocolChangelogFormat. It is confusing to me.Additionally, the protocol
ChangelogFormatdeclares implementations of methods. I consider it confusing too.This change addresses the unnecessary complexity and remove
ChangelogFormatcompletely from the codebase. The alternative now isBaseFormat.I am not sure if this is a breaking change. Please help to review.